home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / manage / snmp / kip / fp3.0 / pbuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-01-17  |  1.3 KB  |  39 lines

  1. /*
  2. **    Copyright (C) 1987 Kinetics, Inc.  All Rights Reserved.
  3. **    This program contains proprietary confidential information
  4. **    and trade secrets of Kinetics, Inc.  Reverse engineering
  5. **    of object code is prohibited.  Use of copyright notice
  6. **    is precautionary and does not imply publication.
  7. **
  8. **    pbuf.h - Constants and structures related to memory allocation
  9. **
  10. */
  11.  
  12. #define    MAXHEAD        128        /* max space for header */
  13. #define    MAXDATA        630        /* max space for data */
  14.  
  15. struct pbuf {
  16.     struct    pbuf *p_next;        /* next buffer in queue */
  17.     unsigned char    *p_off;        /* offset of data */
  18.     short    p_len;            /* amount of data in this pbuf */
  19.     short    p_type;            /* pbuf type (0 == free) */
  20.     unsigned char    p_head[MAXHEAD];    /* header storage */
  21.     unsigned char    p_data[MAXDATA];    /* data storage */
  22. };
  23. /* WARNING: assembler constants in lap.s use this pbuf structure */
  24.  
  25. /* pbuf types (p_type) */
  26. #define    PT_FREE        0    /* should be on free list */
  27. #define    PT_ABUS        1    /* received AppleTalk packet */
  28. #define    PT_ENET        2    /* received Ethernet packet */
  29. #define    PT_ARP        3    /* ARP packet */
  30. #define    PT_DATA        4    /* general data */
  31. #define    PT_ERBF        5    /* awaiting Ethernet receive packet */
  32. #define    PT_ETBF        6    /* awaiting Ethernet transmit complete */
  33.  
  34. struct pqueue {
  35.     struct pbuf *pq_head;
  36.     struct pbuf *pq_tail;
  37.     short    pq_len;
  38. };
  39.